package day06_OOP.demo08;
//通过有参构造对象。然后获取年龄最大的学生
public class Student {
    private int age;
    int[]arr=new int[6];
    int max=arr[0];
    public Student(int[]arr){
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]<arr[i+1]){
                max=arr[i+1];
            }
        }
    }
    public Student(){}
    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }
}
